import java.util.Scanner;

public class demofour {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入一元二次方程的二次项系数:");
        float a = input.nextInt();
        System.out.println("请输入一元二次方程的一次项系数:");
        float b = input.nextInt();
        System.out.println("请输入一元二次方程的常数项系数:");
        float c = input.nextInt();
        float d = b*b-4*a*c;
        double x1 = 0;
        double x2 = 0;
        if(d<0)
            System.out.println("该方程无解");
        else
        {
            x1 = (-b+Math.sqrt(d))/(2*a);
            x2 = (-b-Math.sqrt(d))/(2*a);
        }
        System.out.println("该方程一个根x1="+x1+" "+"该方程另一个根x2="+x2);
    }
}
